const p1 = new Promise((resolve, reject) => {
    setTimeout(() => {
        resolve('p1')
    }, 100)
})
const p2 = new Promise((resolve, reject) => {
    setTimeout(() => {
        reject(new Error('p2'))
    }, 200);
})
const p3 = new Promise((resolve, reject) => {
    setTimeout(() => {
        resolve('p3')
    }, 250);
})

const pArr = [p1, p2, p3]

Promise.all(pArr).then(res => {
    console.log('then', res);
}).catch(err => {
    console.log('catch', err);
    
})